//
//  UIViewController+UIViewController_showHideTabbar.m
//  fengshui
//
//  Created by huliang on 13-4-1.
//
//

#import "UIViewController+UIViewController_showHideTabbar.h"

@implementation UIViewController (UIViewController_showHideTabbar)



-(void)setTabBarHidden:(BOOL)bol{
     if(bol == YES)//隐藏
         {
              [self.tabBarController.view setFrame:CGRectMake(0, 0, 320, 530)];
              NSArray *views = [self.tabBarController.view subviews];
              for(id v in views){
                   if([v isKindOfClass:[UITabBar class]]){
                        [(UITabBar *)v setHidden:YES];
                       }
                  }
             }else {//显示
                  [self.tabBarController.view  setFrame:CGRectMake(0, 0, 320, 480)];
                  NSArray *views = [self.tabBarController.view subviews];
                  for(id v in views){
                       if([v isKindOfClass:[UITabBar class]]){
                            [(UITabBar *)v setHidden:NO];
                           }
                      }
                 }
     
}


@end
